home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / mail / mailleds.93 / mailleds / mailleds-0.93 / README < prev    next >
Text File  |  1996-04-10  |  7KB  |  168 lines

  1. ----------------------
  2. mailleds ver 0.92-beta
  3. ----------------------
  4.  
  5. NOTES on 0.92-beta:
  6. If you're a root user (like I am), and have a nifty bank of parallel port
  7. leds (like I do), you may be interested the -u option, which will allow you
  8. to start mailleds from /etc/rc.local or such.  the lines of my
  9. /etc/rc.d/rc.local read:
  10. /usr/local/bin/mailleds -lp7 -u mtr -a
  11. /usr/local/bin/mailleds -lp6 -u carolyn -a
  12.  
  13. NOTES on 0.9-beta:
  14. One no longer has to specify terminals with the -t option.  Simply add -t
  15. (or don't, since -t is default) to the command line, and mailleds will use
  16. utmp to figure out the neccesary vt's.
  17.  
  18. Having said this, 
  19. "mailleds -t -l s" will now do nicely. This is the same as "mailleds -l s" and
  20. (probably, depending on compile-time options) "mailleds"
  21.  
  22. If anyone actually cared about having a "status" vt, (ie tty7 might be used
  23. to check if you have mail) mail me and I'll probably put the option to
  24. specify ttys on the command line back in. 
  25.  
  26. X support.  Well, what can I say.  I screwed around with having the "regular"
  27. mailleds process latch on and detach from an X server.  That was far too painful. 
  28. So, each X server started should now have it's own "xmailleds" process. Each
  29. "X" mailleds should probably be started from .xinitrc or similar, using
  30. something like: "xmailleds -l s". 
  31.  
  32. You can also do "xmailleds -l s -d <display name>" from anywhere, outside or
  33. inside of X.
  34.  
  35. *********************************
  36. |BUGS BUGS BUGS BUGS BUGS (BUGS)|
  37. *********************************
  38.  
  39. If you have 2 mailleds processes, one a "mailleds -t" that flashes all your
  40. logged in terminals, and one a "xmailleds" that flashes your current X
  41. display, _and_ you start your X session from a terminal using "startx" (or
  42. similar), mailleds will not function properly.  (Read that last sentence
  43. again, despite my awful sentence structure.  It's important.) The keyboard
  44. lights will do funky crap, as both the terminal that's controlling the X
  45. server and the X server's leds will be flashing.  Unpredictable crap.  Argh. 
  46. Well, I'm working on it.  The only fix I know is either a) don't run the
  47. "mailleds -t", or b) don't start X from the command line =).  
  48.  
  49. mailleds, any version at all, might be unstable with development
  50. kernels (1.3.x), since it relies on ioctl syscalls, the most undocumented
  51. and unstable of all kernel calls.  I've heard of some problems, but all
  52. kernels I've tried work fine.  If you want, try setleds(1).  If running
  53. setleds does *not* cause the same problems as mailleds, write me about it. 
  54. Otherwise, I don't want to hear about it. 
  55.  
  56. Other bugs?  You know the shpiel.  mtr@ratbert.bagel.org.
  57.  
  58. 1.     Overview
  59.  
  60. Mailleds is a tiny daemon that monitors a mailbox, and when the mailbox
  61. contains new mail, blinks some LEDs.  These LEDs can be found two places --
  62. on one's keyboard, or hooked up to a parallel port (a la portato).  I find
  63. that it's a nice way to tell you have mail -- it doesn't interrupt
  64. whatever you're doing by posting an on-screen message.  Another benefit of
  65. LED mail notification is that the monitor need not be on.  I can leave my
  66. monitor off all day, and either turn it on or not depending on whether or
  67. not I have mail.  But then again, I'm the author; I have an inherent,
  68. ego-driven need to find this program useful...=) So go ahead, check it out.
  69.  
  70. On my 386-40 (quite a development platform, I know) with 8 megs of ram,
  71. mailleds takes somewhere between .1% and .5% of my CPU time, and 4.6% of my
  72. memory.  This is when mailleds is invoked as
  73. mailleds -aq -t /dev/tty[1-6] and there are two mail messages in my inbox. 
  74. Other options will vary CPU time, of course.
  75.  
  76. 2. General stuff
  77.  
  78. As of now, mailleds has two basic modes: "answering machine" mode, and
  79. "normal" mode.  Answering machine mode (I didn't know what else to call it,
  80. even though I've never seen an answering machine blink out the number of
  81. messages it has.  Usually it has a nifty LCD display or something. 
  82. Anyways.) will blink out the number of emails you have received, pause, and
  83. repeat.  The other mode, is...basic.  It just blinks whenever you have mail.
  84. I don't even *consider* using basic mode anymore.  
  85.  
  86. In -a (answering machine) mode, the timings are mildly important in order to
  87. appease the eye.  Check out the variables in config.h for stuff on this. 
  88. (should I make this a run-time option?)
  89.  
  90. I have other modes planned, based on works like "portato", etc.  Just
  91. imagine -- a 7-led display (one of the ones that forms numbers) plus an
  92. extra led to tell you the 10s column.  One could also use the lcd circuit
  93. built in "lcd-clock" or some such package (it's on sunsite).  I'd build one
  94. of these and add support, if I cared (I don't).  
  95.  
  96. 3.    Some finer notes on doing the parallel port led thing
  97.  
  98. To do the parallel lights thing, check out led-stat.txt in the mailleds
  99. source directory to wire it right and invoke mailleds like:
  100. mailleds -aq -l p5
  101. For parallel lights to work mailleds must be suid root. 
  102.  
  103. NOTE:
  104. When blinking just keyboard LEDs, mailleds will terminate when the
  105. user it's blinking for has logged out of all the ttys specified on the
  106. command line.  When doing parallel LEDs, mailleds will not terminate untill
  107. it recieves a signal.
  108.  
  109. Port leds will not disable screen blanking as keyboard leds did.  For those
  110. concerned with monitor burn in, this is a good thing.  As for me, I find it
  111. kind of irritating.  I *liked* being able to tell whether I had mail by
  112. glancing at my monitor after blanking time had expired. :)
  113.  
  114. The plain vanilla parallel cable I bought was wired like this.  I assume no
  115. responsibility for any damage this info may cause.  
  116.  
  117. pin 2 - red
  118. pin 3 - orange
  119. pin 4 - yellow
  120. pin 5 - dark green
  121. pin 6 - dark blue
  122. pin 7 - purple
  123. pin 8 - gray
  124. pin 9 - white
  125. pin 25 (ground) - Black w/ white stripe
  126.  
  127. If you want to run mailleds in conjunction with a portato that is <= 1.2,
  128. please apply portato.c.diff by doing:
  129.  
  130. cd /usr/src/portato
  131. patch < portato.c.diff 
  132.  
  133. This makes portato play nicely with mailleds and any other led controlling
  134. program.  This patch is included in > 1.2 versions of portato.
  135.  
  136. 4.    Some of the Nastier Stuff 
  137.  
  138. Mailleds should run suid root, due to a limitation in the ioctl()
  139. system call which refuses to change another terminal's LEDs -- even if
  140. that terminal and the current tty are owned by the same user.
  141. Mailleds will run fine without the suid bit, but only the controlling
  142. terminal's (/dev/tty) LEDs will be able to blink.  If you specify
  143. other tty's while running non-suid-root, mailleds will terminate with an
  144. error message.
  145.  
  146. Mailleds, as stated in the man page, will interfere will linux screen
  147. blanking (when run with keyboard leds).  This is because data is being sent
  148. to and received from the keyboard.  There's a comment in the kernel code
  149. about this, but I'm no kernel hacker.
  150.  
  151. 5.    Thanks to:
  152.  
  153. Erik Hetzner, inventor of this craziness
  154. Joseph W. Vigneau and his roommate damian@wpi.edu for their nifty
  155.     parallel port concept and programs.
  156. The author of setleds (who is it?)
  157. Tom Waits, They Might Be Giants, Bill Evans and Leonard Cohen.
  158. Linus, of course.
  159.  
  160. This is my first (and most likely not last) contribution to the Linux
  161. project, so forgive any newbie coding mistakes I have made in the
  162. process.  It started as a shell script, and has made its way through a
  163. perl script up to C, finally.  Having said this, Bug reports,
  164. comments, patches are welcome to: 
  165.  
  166. mtr@ratbert.bagel.org (Benjamin Osheroff)
  167.  
  168.